<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context 
                           http://www.springframework.org/schema/context/spring-context.xsd">
        
	<!-- ******************* -->
	<!-- Hibernate           -->
	<!-- ******************* -->
	
	<bean id="hibernateSessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="annotatedClasses">
			<list>
				<value>om.Bewertung</value>
				<value>om.Bilder</value>
				<value>om.Orte</value>
				<value>om.Region</value>
				<value>om.Route</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
				<prop key="hibernate.hbm2ddl.auto">update</prop>
				<prop key="hibernate.show_sql">true</prop>
				<prop key="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
			</props>
		</property>
	</bean>
	
	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>
	
	<!-- ******************* -->
	<!-- Data Access Objects -->
	<!-- ******************* -->
	 		
	<bean id="routeDao" class="dao.RouteDao">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean> 
	  
	<bean id="orteDao" class="dao.OrteDao">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>
	
	<bean id="regionDao" class="dao.RegionDao">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>

	<bean id="bilderDao" class="dao.BilderDao">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>
	
	<bean id="bewertungDao" class="dao.BewertungDao">
		<property name="sessionFactory" ref="hibernateSessionFactory" />
	</bean>
	
</beans>